<div id="requirement">
	<div class="form">
		<% form_for :requirement, :url => { :action => :edit, :id => @requirement}, 
									:html => { :multipart => true, :class => "form_pic" } do|f| %>
			<%= text_field_for f, :title, @requirement, { :text => "需求标题", :required => true }%>
			<div class="required">
				<div class="form_text">
					<label for="requirement[retype]" class="label">选择分类</label>
					<span class="required_mark">*</span>
				</div>
				<%= f.select(:retype_id, Retype.find(:all).collect {|t| [ t.name, t.id ] }, :selected => @requirement.retype_id ) %>
			</div>
			<%= text_field_for f, :price, @requirement, { :text => "最高预算", :required => true } %>
			<%= text_area_for f, :content, @requirement, { :text => "需求内容", :required => true }%>
			<div class="required">
				<div class="form_text">
					<label for="expiration" class="label">本设计有效期</label>
					<span class="required_mark">*</span>
				</div>
				<%@ex=@requirement.expiration.to_i%>
				<%= f.radio_button :expiration, ONEWEEK, :checked => @ex==ONEWEEK %>一周
				<%= f.radio_button :expiration, TWOWEEKS, :checked => @ex==TWOWEEKS %>两周
				<%= f.radio_button :expiration, ONEMONTH, :checked => @ex==ONEMONTH %>一个月
				<%= f.radio_button :expiration, TWOMONTHS, :checked => @ex==TWOMONTHS %>两个月
			</div>
			<% if @requirement.attach.exists?%>
				<%= render :partial => "download_requirement" %>
			<% end %>
			<p>上传将覆盖原来的附件</p>
			<%= render :partial => "attach_requirement", :locals => { :f => f}%>
			<div class="submit">
				<%= submit_tag "修改"%>
			</div>
		<% end %>	
	</div>			
</div>